@pie-element/graphing 10.1.1 → 10.1.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/configure.d.ts +26 -0
- package/dist/author/configure.js +208 -0
- package/dist/author/correct-response.d.ts +54 -0
- package/dist/author/correct-response.js +304 -0
- package/dist/author/defaults.d.ts +294 -0
- package/dist/author/defaults.js +415 -0
- package/dist/author/graphing-config.d.ts +34 -0
- package/dist/author/graphing-config.js +244 -0
- package/dist/author/index.d.ts +59 -0
- package/dist/author/index.js +96 -0
- package/dist/author/utils.d.ts +43 -0
- package/dist/author/utils.js +260 -0
- package/dist/browser/author/index.js +7626 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/container-Bg6U_CJ-.js +58830 -0
- package/dist/browser/container-Bg6U_CJ-.js.map +1 -0
- package/dist/browser/controller/index.js +380 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +683 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-eInAO7us.js +1468 -0
- package/dist/browser/dist-eInAO7us.js.map +1 -0
- package/dist/browser/graphing.css +2 -0
- package/dist/controller/defaults.d.ts +59 -0
- package/dist/controller/defaults.js +61 -0
- package/dist/controller/index.d.ts +34 -0
- package/dist/controller/index.js +181 -0
- package/dist/controller/utils.d.ts +37 -0
- package/dist/controller/utils.js +114 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.js +43 -0
- package/dist/delivery/main.d.ts +23 -0
- package/dist/delivery/main.js +107 -0
- package/dist/delivery/utils.d.ts +22 -0
- package/dist/graphing.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +404 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIntersection.js +29 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castArrayLikeObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/intersection.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +82 -19
- package/CHANGELOG.json +0 -652
- package/CHANGELOG.md +0 -2043
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -382
- package/configure/CHANGELOG.md +0 -1834
- package/configure/lib/configure.js +0 -328
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/correct-response.js +0 -484
- package/configure/lib/correct-response.js.map +0 -1
- package/configure/lib/defaults.js +0 -448
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/graphing-config.js +0 -388
- package/configure/lib/graphing-config.js.map +0 -1
- package/configure/lib/index.js +0 -173
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -122
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -30
- package/controller/CHANGELOG.json +0 -412
- package/controller/CHANGELOG.md +0 -1267
- package/controller/lib/defaults.js +0 -64
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -459
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -451
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -24
- package/docs/config-schema.json +0 -3164
- package/docs/config-schema.json.md +0 -2293
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -200
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -20
- package/docs/pie-schema.json +0 -3495
- package/docs/pie-schema.json.md +0 -1345
- package/lib/index.js +0 -69
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -161
- package/lib/main.js.map +0 -1
- package/lib/utils.js +0 -24
- package/lib/utils.js.map +0 -1
package/configure.js
ADDED
package/controller.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/controller/index.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/graphing/configure/src/configure.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Configure extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
imageSupport: PropTypes.Requireable<object>;
|
|
16
|
+
uploadSoundSupport: PropTypes.Requireable<object>;
|
|
17
|
+
model: PropTypes.Validator<object>;
|
|
18
|
+
configuration: PropTypes.Validator<object>;
|
|
19
|
+
};
|
|
20
|
+
componentDidMount(): void;
|
|
21
|
+
onRationaleChange: any;
|
|
22
|
+
onPromptChange: any;
|
|
23
|
+
onTeacherInstructionsChange: any;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export default Configure;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/intersection.js";
|
|
2
|
+
import t from "./graphing-config.js";
|
|
3
|
+
import n from "./correct-response.js";
|
|
4
|
+
import r from "react";
|
|
5
|
+
import i from "prop-types";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import c from "debug";
|
|
9
|
+
import l from "@mui/material/Typography";
|
|
10
|
+
import { InputContainer as u, layout as d, settings as f } from "@pie-lib/config-ui";
|
|
11
|
+
import p from "@pie-lib/editable-html-tip-tap";
|
|
12
|
+
//#region src/author/configure.tsx
|
|
13
|
+
var { Panel: ee, toggle: m, radio: h, checkboxes: te, textField: ne, dropdown: re } = f, ie = c("@pie-element:graphing:configure"), g = a(u)(({ theme: e }) => ({
|
|
14
|
+
width: "100%",
|
|
15
|
+
paddingTop: e.spacing(2),
|
|
16
|
+
marginBottom: e.spacing(2)
|
|
17
|
+
})), ae = a(l)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), _ = a("div")(({ theme: e }) => ({
|
|
18
|
+
fontSize: e.typography.fontSize - 2,
|
|
19
|
+
color: e.palette.error.main,
|
|
20
|
+
paddingTop: e.spacing(1)
|
|
21
|
+
})), v = class extends r.Component {
|
|
22
|
+
static propTypes = {
|
|
23
|
+
onModelChanged: i.func,
|
|
24
|
+
onConfigurationChanged: i.func,
|
|
25
|
+
imageSupport: i.object,
|
|
26
|
+
uploadSoundSupport: i.object,
|
|
27
|
+
model: i.object.isRequired,
|
|
28
|
+
configuration: i.object.isRequired
|
|
29
|
+
};
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
let { configuration: t, onModelChanged: n, model: r } = this.props, { availableTools: i, title: a, graphDimensions: o } = t || {}, { arrows: s, titleEnabled: c, dimensionsEnabled: l } = r || {};
|
|
32
|
+
typeof s == "boolean" && (s = s ? {
|
|
33
|
+
left: !0,
|
|
34
|
+
right: !0,
|
|
35
|
+
up: !0,
|
|
36
|
+
down: !0
|
|
37
|
+
} : {
|
|
38
|
+
left: !1,
|
|
39
|
+
right: !1,
|
|
40
|
+
up: !1,
|
|
41
|
+
down: !1
|
|
42
|
+
});
|
|
43
|
+
let u = e(i || [], r.toolbarTools || []), d = c ?? a.enabled, f = l ?? o.enabled;
|
|
44
|
+
n && n({
|
|
45
|
+
...r,
|
|
46
|
+
arrows: s,
|
|
47
|
+
toolbarTools: u,
|
|
48
|
+
titleEnabled: d,
|
|
49
|
+
dimensionsEnabled: f
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
onRationaleChange = (e) => {
|
|
53
|
+
let { onModelChanged: t, model: n } = this.props;
|
|
54
|
+
t({
|
|
55
|
+
...n,
|
|
56
|
+
rationale: e
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
onPromptChange = (e) => {
|
|
60
|
+
let { onModelChanged: t, model: n } = this.props;
|
|
61
|
+
t({
|
|
62
|
+
...n,
|
|
63
|
+
prompt: e
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
onTeacherInstructionsChange = (e) => {
|
|
67
|
+
let { onModelChanged: t, model: n } = this.props;
|
|
68
|
+
t({
|
|
69
|
+
...n,
|
|
70
|
+
teacherInstructions: e
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
render() {
|
|
74
|
+
let { model: e, configuration: r, onConfigurationChanged: i, onModelChanged: a, imageSupport: c, uploadSoundSupport: l } = this.props, { arrows: u = {}, authoring: f = {}, availableTools: v = [], baseInputConfiguration: y = {}, coordinatesOnHover: b = {}, contentDimensions: x = {}, gridConfigurations: S = [], graphDimensions: C = {}, instruction: w = {}, labels: T = {}, padding: E = {}, prompt: D = {}, rationale: O = {}, scoringType: k = {}, settingsPanelDisabled: A, spellCheck: j = {}, studentInstructions: M = {}, teacherInstructions: N = {}, title: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, withRubric: L = {}, language: R = {}, languageChoices: z = {}, mathMlOptions: B = {}, removeIncompleteTool: V = !1 } = r || {}, { errors: H = {}, extraCSSRules: U, labelsEnabled: W, dimensionsEnabled: G, promptEnabled: K, rationaleEnabled: oe, spellCheckEnabled: q, teacherInstructionsEnabled: se, titleEnabled: ce } = e || {}, { prompt: J, rationale: Y, teacherInstructions: X } = H || {};
|
|
75
|
+
ie("[render] model", e);
|
|
76
|
+
let Z = F && F.prompt, Q = I && I.prompt, le = {
|
|
77
|
+
top: T.top,
|
|
78
|
+
right: T.right,
|
|
79
|
+
bottom: T.bottom,
|
|
80
|
+
left: T.left
|
|
81
|
+
}, ue = {
|
|
82
|
+
arrows: u.settings && te(u.label, {
|
|
83
|
+
left: u.left,
|
|
84
|
+
right: u.right,
|
|
85
|
+
up: u.up,
|
|
86
|
+
down: u.down
|
|
87
|
+
}),
|
|
88
|
+
titleEnabled: P.settings && m(P.label),
|
|
89
|
+
padding: E.settings && m(E.label),
|
|
90
|
+
labelsEnabled: T.settings && m(T.label),
|
|
91
|
+
"language.enabled": R.settings && m(R.label, !0),
|
|
92
|
+
language: R.settings && R.enabled && re(z.label, z.options),
|
|
93
|
+
dimensionsEnabled: C.settings && m(C.label),
|
|
94
|
+
coordinatesOnHover: b.settings && m(b.label)
|
|
95
|
+
}, de = {
|
|
96
|
+
"authoring.enabled": f.settings && m(f.label, !0),
|
|
97
|
+
teacherInstructionsEnabled: N.settings && m(N.label),
|
|
98
|
+
studentInstructionsEnabled: M.settings && m(M.label),
|
|
99
|
+
promptEnabled: D.settings && m(D.label),
|
|
100
|
+
rationaleEnabled: O.settings && m(O.label),
|
|
101
|
+
spellCheckEnabled: j.settings && m(j.label),
|
|
102
|
+
scoringType: k.settings && h(k.label, ["dichotomous", "partial scoring"]),
|
|
103
|
+
rubricEnabled: L?.settings && m(L?.label),
|
|
104
|
+
instruction: w.settings && ne(w.label)
|
|
105
|
+
}, $ = (e = {}) => ({
|
|
106
|
+
...y,
|
|
107
|
+
...e
|
|
108
|
+
});
|
|
109
|
+
return /* @__PURE__ */ s(d.ConfigLayout, {
|
|
110
|
+
extraCSSRules: U,
|
|
111
|
+
dimensions: x,
|
|
112
|
+
hideSettings: A,
|
|
113
|
+
settings: /* @__PURE__ */ o(ee, {
|
|
114
|
+
model: e,
|
|
115
|
+
configuration: r,
|
|
116
|
+
onChangeModel: a,
|
|
117
|
+
onChangeConfiguration: i,
|
|
118
|
+
groups: {
|
|
119
|
+
Settings: ue,
|
|
120
|
+
Properties: de
|
|
121
|
+
}
|
|
122
|
+
}),
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ o(ae, {
|
|
125
|
+
component: "div",
|
|
126
|
+
variant: "body1",
|
|
127
|
+
children: w?.label || ""
|
|
128
|
+
}),
|
|
129
|
+
se && /* @__PURE__ */ s(g, {
|
|
130
|
+
label: N.label,
|
|
131
|
+
children: [/* @__PURE__ */ o(p, {
|
|
132
|
+
markup: e.teacherInstructions || "",
|
|
133
|
+
onChange: this.onTeacherInstructionsChange,
|
|
134
|
+
imageSupport: c,
|
|
135
|
+
error: X,
|
|
136
|
+
nonEmpty: !1,
|
|
137
|
+
pluginProps: $(N?.inputConfiguration),
|
|
138
|
+
spellCheck: q,
|
|
139
|
+
maxImageWidth: F && F.teacherInstructions || Z,
|
|
140
|
+
maxImageHeight: I && I.teacherInstructions || Q,
|
|
141
|
+
uploadSoundSupport: l,
|
|
142
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
143
|
+
mathMlOptions: B
|
|
144
|
+
}), X && /* @__PURE__ */ o(_, { children: X })]
|
|
145
|
+
}),
|
|
146
|
+
K && /* @__PURE__ */ s(g, {
|
|
147
|
+
label: D.label,
|
|
148
|
+
children: [/* @__PURE__ */ o(p, {
|
|
149
|
+
markup: e.prompt,
|
|
150
|
+
onChange: this.onPromptChange,
|
|
151
|
+
imageSupport: c,
|
|
152
|
+
error: J,
|
|
153
|
+
nonEmpty: !1,
|
|
154
|
+
spellCheck: q,
|
|
155
|
+
pluginProps: $(D?.inputConfiguration),
|
|
156
|
+
disableUnderline: !0,
|
|
157
|
+
maxImageWidth: Z,
|
|
158
|
+
maxImageHeight: Q,
|
|
159
|
+
uploadSoundSupport: l,
|
|
160
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
161
|
+
mathMlOptions: B
|
|
162
|
+
}), J && /* @__PURE__ */ o(_, { children: J })]
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ o(t, {
|
|
165
|
+
authoring: f,
|
|
166
|
+
availableTools: v,
|
|
167
|
+
gridConfigurations: S,
|
|
168
|
+
graphDimensions: C,
|
|
169
|
+
labelsPlaceholders: le,
|
|
170
|
+
model: e,
|
|
171
|
+
showLabels: W,
|
|
172
|
+
dimensionsEnabled: G,
|
|
173
|
+
showTitle: ce,
|
|
174
|
+
titlePlaceholder: P.placeholder,
|
|
175
|
+
onChange: this.props.onModelChanged,
|
|
176
|
+
mathMlOptions: B,
|
|
177
|
+
removeIncompleteTool: V
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ o(n, {
|
|
180
|
+
availableTools: v,
|
|
181
|
+
errors: H,
|
|
182
|
+
model: e,
|
|
183
|
+
onChange: this.props.onModelChanged,
|
|
184
|
+
mathMlOptions: B,
|
|
185
|
+
removeIncompleteTool: V
|
|
186
|
+
}),
|
|
187
|
+
oe && /* @__PURE__ */ s(g, {
|
|
188
|
+
label: O.label || "Rationale",
|
|
189
|
+
children: [/* @__PURE__ */ o(p, {
|
|
190
|
+
markup: e.rationale || "",
|
|
191
|
+
onChange: this.onRationaleChange,
|
|
192
|
+
imageSupport: c,
|
|
193
|
+
error: Y,
|
|
194
|
+
spellCheck: q,
|
|
195
|
+
pluginProps: $(O?.inputConfiguration),
|
|
196
|
+
maxImageWidth: F && F.rationale || Z,
|
|
197
|
+
maxImageHeight: I && I.rationale || Q,
|
|
198
|
+
uploadSoundSupport: l,
|
|
199
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
200
|
+
mathMlOptions: B
|
|
201
|
+
}), Y && /* @__PURE__ */ o(_, { children: Y })]
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
//#endregion
|
|
208
|
+
export { v as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/graphing/configure/src/correct-response.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const Tools: {
|
|
12
|
+
({ availableTools, defaultTool, hasErrors, toolbarTools, toggleToolBarTool, onDefaultToolChange, }: {
|
|
13
|
+
availableTools: any;
|
|
14
|
+
defaultTool: any;
|
|
15
|
+
hasErrors: any;
|
|
16
|
+
toolbarTools: any;
|
|
17
|
+
toggleToolBarTool: any;
|
|
18
|
+
onDefaultToolChange: any;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
propTypes: {
|
|
21
|
+
toolbarTools: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
22
|
+
toggleToolBarTool: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
+
availableTools: PropTypes.Requireable<any[]>;
|
|
24
|
+
defaultTool: PropTypes.Requireable<string>;
|
|
25
|
+
hasErrors: PropTypes.Requireable<number>;
|
|
26
|
+
onDefaultToolChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare class CorrectResponse extends React.Component {
|
|
30
|
+
static propTypes: {
|
|
31
|
+
availableTools: PropTypes.Requireable<any[]>;
|
|
32
|
+
errors: PropTypes.Requireable<object>;
|
|
33
|
+
model: PropTypes.Validator<object>;
|
|
34
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
35
|
+
toolbarTools: PropTypes.Requireable<unknown[]>;
|
|
36
|
+
};
|
|
37
|
+
state: {
|
|
38
|
+
dialog: {
|
|
39
|
+
open: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
componentDidMount(): void;
|
|
43
|
+
handleAlertDialog: (open: any, callback: any) => void;
|
|
44
|
+
changeMarks: any;
|
|
45
|
+
filterMarks: any;
|
|
46
|
+
changeToolbarTools: any;
|
|
47
|
+
updateModel: any;
|
|
48
|
+
toggleToolBarTool: any;
|
|
49
|
+
onDefaultToolChange: any;
|
|
50
|
+
addAlternateResponse: any;
|
|
51
|
+
deleteAlternateResponse: any;
|
|
52
|
+
render(): React.JSX.Element;
|
|
53
|
+
}
|
|
54
|
+
export default CorrectResponse;
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { renderMath as r } from "@pie-element/shared-math-rendering-mathjax";
|
|
5
|
+
import i from "prop-types";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import { GraphContainer as o } from "@pie-lib/graphing";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import { AlertDialog as l } from "@pie-lib/config-ui";
|
|
10
|
+
import { MenuItem as u, Select as d, Tooltip as f, Typography as p } from "@mui/material";
|
|
11
|
+
import m from "react-dom";
|
|
12
|
+
import h from "@mui/icons-material/Delete";
|
|
13
|
+
import g from "@mui/icons-material/Info";
|
|
14
|
+
//#region src/author/correct-response.tsx
|
|
15
|
+
var _ = "#D5D5D5", v = "#AAAAAA", y = a("div")({ color: v }), b = a("div")(({ theme: e }) => ({
|
|
16
|
+
margin: `${e.spacing(2.5)} 0`,
|
|
17
|
+
cursor: "pointer",
|
|
18
|
+
background: e.palette.grey[200],
|
|
19
|
+
padding: e.spacing(1.5),
|
|
20
|
+
width: "fit-content",
|
|
21
|
+
borderRadius: "4px",
|
|
22
|
+
"&:hover": { background: _ }
|
|
23
|
+
})), x = a("div")(({ theme: e }) => ({
|
|
24
|
+
marginTop: e.spacing(1),
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexWrap: "wrap"
|
|
27
|
+
})), S = a("div")(({ theme: e }) => ({
|
|
28
|
+
cursor: "pointer",
|
|
29
|
+
margin: e.spacing(1),
|
|
30
|
+
padding: e.spacing(1),
|
|
31
|
+
border: `2px solid ${e.palette.common.white}`,
|
|
32
|
+
textTransform: "capitalize",
|
|
33
|
+
"&:hover": { color: e.palette.grey[800] }
|
|
34
|
+
})), C = a(S)({
|
|
35
|
+
background: _,
|
|
36
|
+
border: `2px solid ${v}`
|
|
37
|
+
}), w = a("div")(({ theme: e }) => ({
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
marginTop: e.spacing(2.5)
|
|
41
|
+
})), T = a("div")(({ theme: e }) => ({
|
|
42
|
+
marginLeft: "6px",
|
|
43
|
+
color: e.palette.grey[600],
|
|
44
|
+
"&:hover": {
|
|
45
|
+
cursor: "pointer",
|
|
46
|
+
color: e.palette.common.black
|
|
47
|
+
}
|
|
48
|
+
})), E = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), D = a(({ className: e, ...t }) => /* @__PURE__ */ s(f, {
|
|
49
|
+
...t,
|
|
50
|
+
classes: { tooltip: e }
|
|
51
|
+
}))(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
52
|
+
fontSize: e.typography.fontSize - 2,
|
|
53
|
+
whiteSpace: "pre",
|
|
54
|
+
maxWidth: "500px"
|
|
55
|
+
} })), O = a(p)(({ theme: e }) => ({
|
|
56
|
+
marginTop: e.spacing(1.5),
|
|
57
|
+
marginBottom: e.spacing(1)
|
|
58
|
+
})), k = a("div")({
|
|
59
|
+
display: "flex",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
justifyContent: "space-between"
|
|
62
|
+
}), A = a("div")({
|
|
63
|
+
display: "flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
width: "300px"
|
|
66
|
+
}), j = a(d)(({ theme: e }) => ({
|
|
67
|
+
marginLeft: e.spacing(1),
|
|
68
|
+
textTransform: "uppercase",
|
|
69
|
+
color: e.palette.grey[800]
|
|
70
|
+
})), M = a(u)({ textTransform: "uppercase" }), N = a("div")(({ theme: e }) => ({
|
|
71
|
+
fontSize: e.typography.fontSize - 2,
|
|
72
|
+
color: e.palette.error.main,
|
|
73
|
+
marginTop: e.spacing(1)
|
|
74
|
+
})), P = ({ availableTools: e, defaultTool: t, hasErrors: n, toolbarTools: r, toggleToolBarTool: i, onDefaultToolChange: a }) => {
|
|
75
|
+
let o = e || [], l = o.includes("label"), u = (r || []).filter((e) => e !== "label");
|
|
76
|
+
return l && (o = [...o.filter((e) => e !== "label"), "label"]), /* @__PURE__ */ c(y, { children: [/* @__PURE__ */ c(k, { children: [/* @__PURE__ */ s("span", { children: "GRAPHING TOOLS" }), u.length > 0 && /* @__PURE__ */ c(A, { children: [/* @__PURE__ */ s("span", { children: "Default graphing tool:" }), /* @__PURE__ */ s(j, {
|
|
77
|
+
variant: "standard",
|
|
78
|
+
onChange: a,
|
|
79
|
+
value: t,
|
|
80
|
+
disableUnderline: !0,
|
|
81
|
+
MenuProps: { transitionDuration: {
|
|
82
|
+
enter: 225,
|
|
83
|
+
exit: 195
|
|
84
|
+
} },
|
|
85
|
+
children: u.map((e, t) => /* @__PURE__ */ s(M, {
|
|
86
|
+
value: e,
|
|
87
|
+
children: e
|
|
88
|
+
}, t))
|
|
89
|
+
})] })] }), /* @__PURE__ */ s(x, { children: o.map((e) => /* @__PURE__ */ s(r.find((t) => t === e) ? C : S, {
|
|
90
|
+
style: { ...n && e !== "label" && { color: "red" } },
|
|
91
|
+
onClick: () => i(e),
|
|
92
|
+
children: e.toUpperCase()
|
|
93
|
+
}, e)) })] });
|
|
94
|
+
};
|
|
95
|
+
P.propTypes = {
|
|
96
|
+
toolbarTools: i.arrayOf(i.string),
|
|
97
|
+
toggleToolBarTool: i.func,
|
|
98
|
+
availableTools: i.array,
|
|
99
|
+
defaultTool: i.string,
|
|
100
|
+
hasErrors: i.number,
|
|
101
|
+
onDefaultToolChange: i.func
|
|
102
|
+
};
|
|
103
|
+
var F = class extends n.Component {
|
|
104
|
+
static propTypes = {
|
|
105
|
+
availableTools: i.array,
|
|
106
|
+
errors: i.object,
|
|
107
|
+
model: i.object.isRequired,
|
|
108
|
+
onChange: i.func.isRequired,
|
|
109
|
+
toolbarTools: i.arrayOf(i.String)
|
|
110
|
+
};
|
|
111
|
+
state = { dialog: { open: !1 } };
|
|
112
|
+
componentDidMount() {
|
|
113
|
+
try {
|
|
114
|
+
r(m.findDOMNode(this));
|
|
115
|
+
} catch {
|
|
116
|
+
console.error("DOM not mounted");
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
handleAlertDialog = (e, t) => this.setState({ dialog: { open: e } }, t);
|
|
120
|
+
changeMarks = (e, n) => {
|
|
121
|
+
let { model: r, onChange: i } = this.props;
|
|
122
|
+
t(r, `answers.${e}.marks`, n), i(r);
|
|
123
|
+
};
|
|
124
|
+
filterMarks = (e) => {
|
|
125
|
+
let { model: { answers: t } } = this.props;
|
|
126
|
+
return Object.entries(t || {}).reduce((t, [n, r]) => (t[n] = {
|
|
127
|
+
...r,
|
|
128
|
+
marks: (r.marks || []).filter((t) => t.type !== e)
|
|
129
|
+
}, t), {});
|
|
130
|
+
};
|
|
131
|
+
changeToolbarTools = (e) => {
|
|
132
|
+
let { model: t, onChange: n } = this.props;
|
|
133
|
+
t.toolbarTools = e, n(t);
|
|
134
|
+
};
|
|
135
|
+
updateModel = (e) => {
|
|
136
|
+
let { model: t, onChange: n } = this.props;
|
|
137
|
+
n({
|
|
138
|
+
...t,
|
|
139
|
+
...e
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
toggleToolBarTool = (t) => {
|
|
143
|
+
let { model: { defaultTool: n, toolbarTools: r, answers: i = {} } } = this.props, a = [...r], o = n, s = r.findIndex((e) => t === e);
|
|
144
|
+
if (s >= 0) {
|
|
145
|
+
let r = this.filterMarks(t);
|
|
146
|
+
if (a.splice(s, 1), t === n) {
|
|
147
|
+
let e = (a || []).filter((e) => e !== "label");
|
|
148
|
+
o = e.length && e[0] || "";
|
|
149
|
+
}
|
|
150
|
+
if (!e(i, r)) {
|
|
151
|
+
this.setState({ dialog: {
|
|
152
|
+
open: !0,
|
|
153
|
+
title: "Warning",
|
|
154
|
+
text: `Correct answer includes one or more ${t} objects and all of them will be deleted.`,
|
|
155
|
+
onConfirm: () => this.handleAlertDialog(!1, this.updateModel({
|
|
156
|
+
toolbarTools: a,
|
|
157
|
+
answers: r,
|
|
158
|
+
defaultTool: o
|
|
159
|
+
})),
|
|
160
|
+
onClose: () => this.handleAlertDialog(!1)
|
|
161
|
+
} });
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
} else a.push(t), n === "" && t !== "label" && (o = t);
|
|
165
|
+
this.updateModel({
|
|
166
|
+
toolbarTools: a,
|
|
167
|
+
defaultTool: o
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
onDefaultToolChange = (e) => {
|
|
171
|
+
let { value: t } = e.target;
|
|
172
|
+
this.updateModel({ defaultTool: t });
|
|
173
|
+
};
|
|
174
|
+
addAlternateResponse = () => {
|
|
175
|
+
let { model: e, onChange: n } = this.props, { answers: r } = e || {}, i = Object.keys(r || {});
|
|
176
|
+
t(e, `answers.${`alternate${i.length}`}`, {
|
|
177
|
+
name: `Alternate ${i.length}`,
|
|
178
|
+
marks: []
|
|
179
|
+
}), n(e);
|
|
180
|
+
};
|
|
181
|
+
deleteAlternateResponse = (e, t) => {
|
|
182
|
+
let { model: n, onChange: r } = this.props, { answers: i } = n || {}, { marks: a = [], name: o } = t || {}, s = () => {
|
|
183
|
+
delete i[e];
|
|
184
|
+
let t = Object.entries(i).reduce((e, t, n) => {
|
|
185
|
+
let [r, i] = t;
|
|
186
|
+
return r === "correctAnswer" ? {
|
|
187
|
+
...e,
|
|
188
|
+
[r]: i
|
|
189
|
+
} : {
|
|
190
|
+
...e,
|
|
191
|
+
["alternate" + n]: {
|
|
192
|
+
...i,
|
|
193
|
+
name: `Alternate ${n}`
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}, {});
|
|
197
|
+
r({
|
|
198
|
+
...n,
|
|
199
|
+
answers: t
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
if (a.length) {
|
|
203
|
+
this.setState({ dialog: {
|
|
204
|
+
open: !0,
|
|
205
|
+
title: "Warning",
|
|
206
|
+
text: `${o} includes one or more shapes and the entire response will be deleted.`,
|
|
207
|
+
onConfirm: () => this.handleAlertDialog(!1, s),
|
|
208
|
+
onClose: () => this.handleAlertDialog(!1)
|
|
209
|
+
} });
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
s();
|
|
213
|
+
};
|
|
214
|
+
render() {
|
|
215
|
+
let { availableTools: e, errors: t, model: r, mathMlOptions: i = {}, removeIncompleteTool: a } = this.props, { dialog: u } = this.state, { answers: d = {}, arrows: f, backgroundMarks: m, coordinatesOnHover: _, defaultTool: v, domain: y, graph: x = {}, labels: S, labelsEnabled: C, range: k, title: A, titleEnabled: j, toolbarTools: M } = r || {}, { correctAnswerErrors: F = {}, toolbarToolsError: I } = t || {};
|
|
216
|
+
return /* @__PURE__ */ c("div", { children: [
|
|
217
|
+
/* @__PURE__ */ s(p, {
|
|
218
|
+
component: "div",
|
|
219
|
+
variant: "h6",
|
|
220
|
+
children: "Define Tool Set and Correct Response"
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ s(O, {
|
|
223
|
+
component: "div",
|
|
224
|
+
variant: "body1",
|
|
225
|
+
children: "Use this interface to choose which graphing tools students will be able to use, and to define the correct answer"
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ s(P, {
|
|
228
|
+
availableTools: e,
|
|
229
|
+
defaultTool: v,
|
|
230
|
+
hasErrors: !!I,
|
|
231
|
+
onDefaultToolChange: this.onDefaultToolChange,
|
|
232
|
+
toggleToolBarTool: this.toggleToolBarTool,
|
|
233
|
+
toolbarTools: M
|
|
234
|
+
}),
|
|
235
|
+
I && /* @__PURE__ */ s(N, { children: I }),
|
|
236
|
+
Object.entries(d || {}).map(([e, t]) => {
|
|
237
|
+
let { marks: r = [], name: l } = t || {};
|
|
238
|
+
return /* @__PURE__ */ c(n.Fragment, { children: [
|
|
239
|
+
/* @__PURE__ */ c(w, { children: [
|
|
240
|
+
/* @__PURE__ */ s(E, { children: l }),
|
|
241
|
+
e === "correctAnswer" && /* @__PURE__ */ s(D, {
|
|
242
|
+
disableFocusListener: !0,
|
|
243
|
+
disableTouchListener: !0,
|
|
244
|
+
placement: "right",
|
|
245
|
+
title: "At least 1 graph object should be defined.",
|
|
246
|
+
children: /* @__PURE__ */ s(g, {
|
|
247
|
+
fontSize: "small",
|
|
248
|
+
color: "primary",
|
|
249
|
+
style: {
|
|
250
|
+
marginLeft: "8px",
|
|
251
|
+
marginBottom: "auto"
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
}),
|
|
255
|
+
e !== "correctAnswer" && /* @__PURE__ */ s(T, {
|
|
256
|
+
onClick: () => this.deleteAlternateResponse(e, t),
|
|
257
|
+
children: /* @__PURE__ */ s(h, {})
|
|
258
|
+
})
|
|
259
|
+
] }),
|
|
260
|
+
/* @__PURE__ */ s(o, {
|
|
261
|
+
style: F[e] && { border: "2px solid red" },
|
|
262
|
+
axesSettings: { includeArrows: f },
|
|
263
|
+
backgroundMarks: m.filter((e) => !e.building),
|
|
264
|
+
coordinatesOnHover: _,
|
|
265
|
+
disabledLabels: !0,
|
|
266
|
+
disabledTitle: !0,
|
|
267
|
+
domain: y,
|
|
268
|
+
draggableTools: e === "correctAnswer",
|
|
269
|
+
labels: S,
|
|
270
|
+
marks: r,
|
|
271
|
+
onChangeMarks: (t) => this.changeMarks(e, t),
|
|
272
|
+
range: k,
|
|
273
|
+
showLabels: C,
|
|
274
|
+
showTitle: j,
|
|
275
|
+
size: {
|
|
276
|
+
width: x.width,
|
|
277
|
+
height: x.height
|
|
278
|
+
},
|
|
279
|
+
title: A,
|
|
280
|
+
toolbarTools: M,
|
|
281
|
+
onChangeTools: (e) => this.updateModel({ toolbarTools: e }),
|
|
282
|
+
mathMlOptions: i,
|
|
283
|
+
removeIncompleteTool: a,
|
|
284
|
+
limitLabeling: !0
|
|
285
|
+
}),
|
|
286
|
+
F[e] && /* @__PURE__ */ s(N, { children: F[e] })
|
|
287
|
+
] }, `correct-response-graph-${l}`);
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ s(b, {
|
|
290
|
+
onClick: this.addAlternateResponse,
|
|
291
|
+
children: "ADD ALTERNATE"
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ s(l, {
|
|
294
|
+
open: u.open,
|
|
295
|
+
title: u.title,
|
|
296
|
+
text: u.text,
|
|
297
|
+
onClose: u.onClose,
|
|
298
|
+
onConfirm: u.onConfirm
|
|
299
|
+
})
|
|
300
|
+
] });
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
//#endregion
|
|
304
|
+
export { F as default };
|